<?php

defined('SYSPATH') OR die('No direct access allowed.');

class Email_Controller extends Template_Controller {

    const ALLOW_PRODUCTION = FALSE;

    public $template = 'kohana/blank';

    public function index() {

        $to = 'ericvvf@live.com';
        $from = 'totalkwithfab10@gmail.com';
        $subject = 'This is an example subject';
        $message = 'This is an <strong>example</strong> message';

        email::send($to, $from, $subject, $message, TRUE);
    }

    public function __call($method, $arguments) {

        $this->auto_render = FALSE;

        echo 'This text is generated by __call. If you expected the index page, you need to use: welcome/index/' . substr(Router::$current_uri, 8);
    }

}
